#pragma once
#include <Display/camera_interface.h>
#include <DataCore/sim_data.h>

namespace PhysLeo {

/**
 * Render interface, all renders should extends this interface
 */
template<typename T>
class Render {
public:
	Render() :hidden_(false) {}

    Render(const Render<T>&) = delete;

    Render(Render<T>&&) = delete;

    Render<T>& operator=(const Render<T>&) = delete;

    Render<T>& operator=(Render<T>&&) = delete;

    virtual ~Render() = default;

	bool isHidden() const
	{
	    return hidden_;
	}

	void hide()
	{
	    hidden_ = true;
	}

	void show()
	{
	    hidden_ = false;
	}

    /*
     * init the rendering data interface
     */
	virtual void init(SimData<T> &simData) = 0;

	virtual void draw(CameraInterface &camera) = 0;

    virtual void transformToDrawData() = 0;

	virtual void updateDrawData() = 0;
private:
    /**
     * whether to hide this render or not
     */
	bool hidden_;
};

}